<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>类的操作</title>
    <script src="../../js/common.js" type="text/javascript"></script>
    <style>
        .b1{
            width: 100px;
            height: 200px;
            background-color: yellow;
        }
        .b2{
            width: 200px;
            height: 300px;
            background-color: red;
        }
        .b3{
            box-shadow: 10px 10px 20px grey;
        }
    </style>
    <script type="text/javascript">
        window.onload = function () {
            let btn = document.getElementById('btn1');
            let div = document.getElementById('div');
            bind(btn,'click',function () {
                //addClass(div,'b2');
                //remove(div,'b2');
                toggleClass(div,'b2');
                toggleClass(div,'b3');
            })

        }
    </script>
</head>
<body>
<input type="button" value="updateClass" id="btn1">
<br><br>
<div id="div" class="b1"></div>
</body>
</html>